A database system is an organized body of related information. Typically, a database stores a variety of information for an entity. Frequently, a database has different users or clients that access it for different reasons. Some database users, for example, are interested in changes that occur in a database. A change in a database can be significant or minor and may be called an event.
Normally, a database user is not interested in every event that occurs in a database. More likely, a database user is only interested in the occurrence of certain database events. As a consequence of this need, database event notification infrastructures allow database users to set up event registrations in which the client can be electronically notified when certain database events occur without remaining active connections to the database, which would adversely affect the performance of the database. For example, a user can set up an event registration to be notified when a message is being enqueued and the message may indicate that a database change has happened.
Traditionally, once a client registers for event notification of a database event, the event registration remains within the event notification infrastructure until either the client explicitly removes the event registration or there is failure during event notification. However, it maybe inefficient for a database to store a client's event registration in its memory until the client explicitly removes it. This is because clients often leave outdated event registration files in the database which consume computer resources.
For instance, a client might initially register with a database but subsequently forget about the event registration after the event registration loses importance. Also, a database and a client's geographical locations may cause it to be inconvenient or impossible for the client to frequently communicate with the database and remove the event registration explicitly. Moreover, a client may be unmotivated to explicitly remove an event registration from a database because it requires additional time and energy.
Regardless of why a client fails to remove an outdated event registration, the end result remains that outdated event registration files consume a growing amount of memory space and processing power in a database system. For example, every time that an event transpires someone enqueues a message, processing power will be needed to check event registration files to determine whether a client needs to be notified.
On one hand, requiring a client to connect back to the database to remove an event registration adds undesirable overhead. On the other hand, if the client does not connect back to remove event registrations, the client will continue to receive notification that the client is not interested in.